{include file="public/header" /}
<form class="layui-form">
	<div class="layui-form-item">
		<label class="layui-form-label">文本</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" id="test_input" placeholder="请输入文本">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">富文本</label>
		<div class="layui-input-block">
			<textarea class="layui-textarea" id="test_rich" placeholder="请输入富文本"></textarea>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">参照</label>
		<div class="layui-input-block">
			<select id="test_reference">
				<option value="1" selected>开启</option>
				<option value="0">关闭</option>
			</select>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">时间戳</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" id="test_time">
		</div>
		<script type="text/javascript">
			layui.use('laydate', function(){
				laydate = layui.laydate;
				laydate.render({
					elem: '#test_time',
					type: 'datetime'
				});
			});
		</script>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">日期</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" id="test_data">
		</div>
		<script type="text/javascript">
			layui.use('laydate', function(){
				laydate = layui.laydate;
				laydate.render({
					elem: '#test_data'
				});
			});
		</script>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">日期时间</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" id="test_datatime">
		</div>
		<script type="text/javascript">
			layui.use('laydate', function(){
				laydate = layui.laydate;
				laydate.render({
					elem: '#test_datatime',
					type: 'datetime'
				});
			});
		</script>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">图片</label>
		<div class="layui-input-inline">
			<button type="button" class="layui-btn layui-btn-fluid" id="up_test_img">上传图片</button>
		</div>
		<div class="layui-form-mid layui-word-aux">支持png,jpg,gif</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">图片预览</label>
		<div class="layui-input-block">
			<div class="layui-upload-list" id="demo_test_img" style="width:90%;float:left;"></div>
		</div>
		<script type="text/javascript">
			layui.use(['layer','upload'],function(){
				layer = layui.layer;
				$ = layui.jquery;
				upload = layui.upload;
				upload.render({
					elem: "#up_test_img",
					url: "{$config['admin_route']}index/upload_img",
					multiple: true,
					done: function(res,title){
						if(res.code > 0){
							return layer.msg("上传失败，"+res.msg);
						}else{
							$("#demo_test_img").append('<div class="upload_pic_li" style="position:relative; width:100px; float:left; margin:0 10px 10px 0"><img style="width:100px;height:100px;" src="'+ res.url +'" class="layui-upload-img" onmouseover="show_img(this)" onmouseleave="hide_img()"><input type="hidden" name="test_img" value="'+res.data+'"/><a class="close-img" href="javascript:;" onclick="deleteImage(\''+res.data+'\',this);return false;"></a></div>');
						}
					}
				});
			});
		</script>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">百度富文本</label>
		<div class="layui-input-block">
			<textarea  id="test_rich_baidu" style="width:100%;" placeholder="请输入百度富文本"></textarea>
		</div>
		<script type="text/javascript" charset="utf-8" src="/static/third/kindeditor/kindeditor-all-min.js"></script>
		<script type="text/javascript" charset="utf-8" src="/static/third/kindeditor/lang/zh-CN.js"></script>
		<script type="text/javascript">
			KindEditor.ready(function(K) {
				window.editor = K.create('#test_rich_baidu',{
					items : [
						'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
						'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
						'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
						'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
						'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
						'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'multiimage',
						'flash', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
						'anchor', 'link', 'unlink', '|', 'about'
					],
					minHeight:'350px',
					allowFileManager : true,
					uploadJson : "{$config['admin_route']}index/upload_imgs_kin",
					afterUpload: function(){this.sync();}, //图片上传后，将上传内容同步到textarea中
					afterBlur: function(){this.sync();},   //失去焦点时，将上传内容同步到textarea中
				});
			});
		</script>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">网址链接</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" id="test_url" placeholder="请输入网址链接">
		</div>
	</div>
</form>
{include file="public/tail" /}